{%- macro upFirst(text) -%}
  {{ text[0] | upper}}{{text[1:] }}
{%- endmacro -%}
{%- macro funcName(text) -%}
  {{ text | regex_replace(pattern="\.", replace="_") }}
{%- endmacro -%}
defmodule OpenTelemetry.SemanticConventions.{{ upFirst(module) }} do
  @doc """
  The schema url for telemetry resources.

      iex> OpenTelemetry.SemanticConventions.{{ upFirst(module) }}.{{ module }}_schema_url()
      "{{ schema_uri }}"
  """
  @spec {{ module }}_schema_url :: String.t()
  def {{ module }}_schema_url do
    "{{ schema_uri }}"
  end

{%- for attribute in attributes | unique(attribute="fqn") %}
  @doc """
  {{ attribute.brief | to_doc_brief | regex_replace(pattern="\n", replace="\n  ") }}
  {%- if attribute.note %}

  ### Notes

  {{attribute.note | to_doc_brief | regex_replace(pattern="\n", replace="\n  ") }}
  {%- endif %}

      iex> OpenTelemetry.SemanticConventions.{{ upFirst(module) }}.{{ funcName(attribute.fqn) }}()
      :"{{ attribute.fqn }}"
  """
  {%- if attribute.deprecated %}
  @deprecated """
  {{ attribute.deprecated | to_doc_brief | regex_replace(pattern="\n", replace="\n  ") }}
  """
  {%- endif %}
  @spec {{ funcName(attribute.fqn) }} :: :"{{ attribute.fqn }}"
  def {{ funcName(attribute.fqn) }} do
    :"{{ attribute.fqn }}"
  end

{%- endfor %}
end
